<template>
  <!-- 导航栏 -->
  <van-nav-bar title="个人中心" left-text="返回" left-arrow @click-left="onClickLeft" />
  我是大天才盛宇{{ personal }}
</template>
<script>
import http from "@/utils/http.js";
export default {
  data() {
    return {
      personal: []
    };
  },
  methods: {
    onClickLeft() {
      this.$router.replace("/");
    }
  },
  created() {
    http
      .request({
        url: "/users/info",
        method: "GET",
        params: {
          id: localStorage.getItem("user_id")
        }
      })
      .then((r) => {
        console.log(r.data);
        this.personal = r.data.info;
      });
  }
};
</script>
<style lang="css" scoped></style>
